\subsection{Python}
\begin{frame}
    \frametitle{Syntax and Data Types}
    \begin{block}{}
        Whitespace matters. Use \emph{tabs} or \emph{spaces}, don't mix. No block delimiters.
    \end{block}
    \begin{itemize}
        \item This is an \textbf{int} (signed, 32bits) : 100
        \item This is a \textbf{long} (signed, infinite): 100L
        \item This is a \textbf{str}: "meow$\backslash$x00$\backslash$n" or 'meow$\backslash$x00$\backslash$n' (" $=$ ')
        \item This is a \textbf{tuple} (immutable): (10, 20, "25")
        \item This is a \textbf{list} (mutable): [10, 20, "25"]
        \item This is a \textbf{dict} (mutable): \{"one":1 , "two":2\}
        \item This is a \textbf{set} (mutable): set([1, 2, 3, 4])
    \end{itemize}
\end{frame}


\begin{frame}
    \frametitle{Keywords}
    \begin{block}{}
        29 keywords to rule them all
    \end{block}
    \begin{center}
    \begin{tabular}{|l|l|l|l|}
\hline
        \uncover{and & assert & break & class}
\\ \hline
        \uncover{continue & def & del & elif}
\\ \hline
        \uncover{else & except & exec & finally}
\\ \hline
        \uncover{for & from & global & if}
\\ \hline
        \uncover{import & in & is & lambda}
\\ \hline
        \uncover{not & or & pass & print}
\\ \hline
        \uncover{raise & return & try & while}
\\ \hline
        \uncover{yield & & &}
\\ \hline
    \end{tabular}
    \end{center}
\end{frame}


\begin{frame}[fragile, t]
    \frametitle{Conditionals, Loops and Exceptions}
    \begin{columns}[T]
        \column{.5\textwidth}
            \begin{block}{}
                \begin{tiny}
                \begin{semiverbatim}
if \emph{conditional}:
    \emph{instruction}
    \emph{instruction}
elif \emph{conditional}:
    \emph{instruction}
else:
    \emph{instruction}
    \emph{instruction}
                \end{semiverbatim}
                \end{tiny}
            \end{block}
        \column{.5\textwidth}
            \begin{block}{}
                \begin{tiny}
                \begin{semiverbatim}
for \emph{x} in \emph{set}:
    \emph{instruction}

for \emph{x} in xrange(\emph{100}):
    \emph{instruction}

while \emph{conditional}:
    \emph{instruction}
                \end{semiverbatim}
                \end{tiny}
            \end{block}
    \end{columns}
    \begin{block}{}
        \begin{tiny}
        \begin{semiverbatim}
try:
    \emph{instruction}
except:
    \emph{instruction}
else:
    \emph{instruction}
        \end{semiverbatim}
        \end{tiny}
    \end{block}
    \begin{itemize}
        \item Python essentially reads like pseudo code
        \item Pencil + napkin + 10 minutes $=$ Python code
    \end{itemize}
\end{frame}

\begin{frame}[fragile, t]
    \frametitle{Functions and Classes}
    \begin{columns}[T]
        \column{.5\textwidth}
            \begin{block}{Functions}
                \begin{tiny}
                \begin{semiverbatim}
def do\_something (\emph{arg}):
    \emph{instruction}
    return \emph{something}

def do\_something (\emph{arg1}, \emph{arg2}=10, \emph{arg3}=20):
    \emph{instruction}

do\_something(1, 5)
do\_something(1, arg3=50)
                \end{semiverbatim}
                \end{tiny}
            \end{block}
        \column{.5\textwidth}
            \begin{block}{Classes}
                \begin{tiny}
                \begin{semiverbatim}
class my\_class:
    def \_\_init\_\_ (self, \emph{arg}):
        \emph{instruction}

    def member\_routine(self, \emph{arg}):
        \emph{instruction}
        return \emph{something}

class inherit (my\_class):
                \end{semiverbatim}
                \end{tiny}
            \end{block}
    \end{columns}
    \begin{itemize}
        \item Functions can take a variable number of arguments
        \item You can specify some or all of the optional arguments
        \item Use classes to define structures
    \end{itemize}
\end{frame}
